﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace C4F.DevKit.Bluetooth
{
    namespace FileTransferProfile
    {

        /// <summary>
        /// EventArgs class to be used when an DeleteFolder operation completes.
        /// </summary>
        public class DeleteFolderCompletedEventArgs : AsyncCompletedEventArgs
        {
            #region Private Members

            /// <summary>
            /// The location of the folder on remote device that has to be 
            /// deleted.
            /// </summary>
            private string remFolderPath;

            /// <summary>
            /// Flag indicating whether Sub-Folders have to be deleted.
            /// </summary>
            private bool deleteSubDirectories;
            #endregion

            #region Public Properties


            /// <summary>
            /// Gets the location of the folder on remote device that has to 
            /// be deleted.
            /// </summary>
            public string RemoteFolderPath
            {
                get
                { return this.remFolderPath; }
            }

            /// <summary>
            /// Gets the flag indicating whether Sub-Folders have to be 
            /// deleted.
            /// </summary>
            public bool DeleteSubDirectories
            {
                get
                { return this.deleteSubDirectories; }
            }


            #endregion

            #region Constructor
            /// <summary>
            /// Initializes the DeleteFolderCompletedEventArgs object.
            /// </summary>
            /// <param name="remoteFolderPath">The location of the folder on 
            /// remote device that has to be deleted.</param>
            /// <param name="deleteSubDirectories">The flag indicating whether
            /// Sub-Folders have to be deleted.</param>
            /// <param name="error">An error that occurred during the 
            /// asynchronous operation.</param>
            /// <param name="cancelled">A value indicating whether the 
            /// asynchronous operation was cancelled.</param>
            /// <param name="userState">The user-supplied state object 
            /// supplied when the asynchronous operation was requested.</param>


            public DeleteFolderCompletedEventArgs(string remoteFolderPath,
                                                  bool deleteSubDirectories,
                                                  Exception error,
                                                  bool cancelled,
                                                  object userState)
                : base(error, cancelled, userState)
            {

                this.remFolderPath = remoteFolderPath;
                this.deleteSubDirectories = deleteSubDirectories;
            }
            #endregion
        }
    }
}